import request from '@/plugins/request';





/**
 * @description 车辆管理-- 分类
 */
export function treeListApi (type) {
    return request({
        url: `rent/category/tree/${type}`,
        method: 'get'
    });
}


/**
 * @description 车辆分类 -- 列表
 * @param {Object} param params {Object} 传值参数
 */
export function carCategoryListApi (params) {
    return request({
        url: 'rent/category',
        method: 'get',
        params
    });
}

/**
 * @description 产品分类 -- 添加表单
 * @param {Object} param params {Object} 传值参数
 */
export function carCategoryCreateApi () {
    return request({
        url: 'rent/category/create',
        method: 'get'
    });
}

/**
 * @description 产品分类 -- 编辑表单
 * @param {Object} param params {Object} 传值参数
 */
export function carCategoryEditApi (id) {
    return request({
        url: `rent/category/${id}`,
        method: 'get'
    });
}

/**
 * @description 产品分类 -- 修改状态
 * @param {Object} param params {Object} 传值参数
 */
export function setShowApi (data) {
    return request({
        url: `rent/category/set_show/${data.id}/${data.is_show}`,
        method: 'PUT'
    });
}

/**
 * @description 产品分类-- cascader
 */
export function cascaderListApi (type) {
    return request({
        url: `rent/category/cascader_list/${type}`,
        method: 'get'
    });
}

